Optimal. Leaf size=112 \[ -\frac{b^2 d \text{PolyLog}\left (2,1-\frac{2}{1-c x}\right )}{c}+\frac{d (c x+1)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac{2 b d \log \left (\frac{2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c}+a b d x+\frac{b^2 d \log \left (1-c^2 x^2\right )}{2 c}+b^2 d x \tanh ^{-1}(c x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.118684, antiderivative size = 112, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.412, Rules used = {5928, 5910, 260, 1586, 5918, 2402, 2315} \[ -\frac{b^2 d \text{PolyLog}\left (2,1-\frac{2}{1-c x}\right )}{c}+\frac{d (c x+1)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac{2 b d \log \left (\frac{2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c}+a b d x+\frac{b^2 d \log \left (1-c^2 x^2\right )}{2 c}+b^2 d x \tanh ^{-1}(c x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5928
Rule 5910
Rule 260
Rule 1586
Rule 5918
Rule 2402
Rule 2315
Rubi steps
\begin{align*} \int (d+c d x) \left (a+b \tanh ^{-1}(c x)\right )^2 \, dx &=\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac{b \int \left (-d^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac{2 \left (d^2+c d^2 x\right ) \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2}\right ) \, dx}{d}\\ &=\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac{(2 b) \int \frac{\left (d^2+c d^2 x\right ) \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2} \, dx}{d}+(b d) \int \left (a+b \tanh ^{-1}(c x)\right ) \, dx\\ &=a b d x+\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac{(2 b) \int \frac{a+b \tanh ^{-1}(c x)}{\frac{1}{d^2}-\frac{c x}{d^2}} \, dx}{d}+\left (b^2 d\right ) \int \tanh ^{-1}(c x) \, dx\\ &=a b d x+b^2 d x \tanh ^{-1}(c x)+\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac{2 b d \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1-c x}\right )}{c}+\left (2 b^2 d\right ) \int \frac{\log \left (\frac{2}{1-c x}\right )}{1-c^2 x^2} \, dx-\left (b^2 c d\right ) \int \frac{x}{1-c^2 x^2} \, dx\\ &=a b d x+b^2 d x \tanh ^{-1}(c x)+\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac{2 b d \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1-c x}\right )}{c}+\frac{b^2 d \log \left (1-c^2 x^2\right )}{2 c}-\frac{\left (2 b^2 d\right ) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1-c x}\right )}{c}\\ &=a b d x+b^2 d x \tanh ^{-1}(c x)+\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac{2 b d \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1-c x}\right )}{c}+\frac{b^2 d \log \left (1-c^2 x^2\right )}{2 c}-\frac{b^2 d \text{Li}_2\left (1-\frac{2}{1-c x}\right )}{c}\\ \end{align*}
Mathematica [A] time = 0.31873, size = 156, normalized size = 1.39 \[ \frac{d \left (2 b^2 \text{PolyLog}\left (2,-e^{-2 \tanh ^{-1}(c x)}\right )+a^2 c^2 x^2+2 a^2 c x+2 a b \log \left (1-c^2 x^2\right )+2 a b c x+a b \log (1-c x)-a b \log (c x+1)+2 b \tanh ^{-1}(c x) \left (c x (a c x+2 a+b)-2 b \log \left (e^{-2 \tanh ^{-1}(c x)}+1\right )\right )+b^2 \log \left (1-c^2 x^2\right )+b^2 \left (c^2 x^2+2 c x-3\right ) \tanh ^{-1}(c x)^2\right )}{2 c} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.051, size = 296, normalized size = 2.6 \begin{align*}{\frac{c{a}^{2}d{x}^{2}}{2}}+{a}^{2}dx+{\frac{cd{b}^{2} \left ({\it Artanh} \left ( cx \right ) \right ) ^{2}{x}^{2}}{2}}+{b}^{2} \left ({\it Artanh} \left ( cx \right ) \right ) ^{2}xd+{b}^{2}dx{\it Artanh} \left ( cx \right ) +{\frac{3\,{b}^{2}{\it Artanh} \left ( cx \right ) \ln \left ( cx-1 \right ) d}{2\,c}}+{\frac{{b}^{2}{\it Artanh} \left ( cx \right ) \ln \left ( cx+1 \right ) d}{2\,c}}-{\frac{d{b}^{2}}{4\,c}\ln \left ({\frac{1}{2}}+{\frac{cx}{2}} \right ) \ln \left ( -{\frac{cx}{2}}+{\frac{1}{2}} \right ) }+{\frac{{b}^{2}\ln \left ( cx+1 \right ) d}{4\,c}\ln \left ( -{\frac{cx}{2}}+{\frac{1}{2}} \right ) }-{\frac{d{b}^{2}}{c}{\it dilog} \left ({\frac{1}{2}}+{\frac{cx}{2}} \right ) }-{\frac{{b}^{2} \left ( \ln \left ( cx+1 \right ) \right ) ^{2}d}{8\,c}}+{\frac{d{b}^{2}\ln \left ( cx-1 \right ) }{2\,c}}+{\frac{{b}^{2}\ln \left ( cx+1 \right ) d}{2\,c}}+{\frac{3\,{b}^{2} \left ( \ln \left ( cx-1 \right ) \right ) ^{2}d}{8\,c}}-{\frac{3\,d{b}^{2}\ln \left ( cx-1 \right ) }{4\,c}\ln \left ({\frac{1}{2}}+{\frac{cx}{2}} \right ) }+cdab{\it Artanh} \left ( cx \right ){x}^{2}+2\,ab{\it Artanh} \left ( cx \right ) xd+abdx+{\frac{3\,ab\ln \left ( cx-1 \right ) d}{2\,c}}+{\frac{ab\ln \left ( cx+1 \right ) d}{2\,c}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.74104, size = 392, normalized size = 3.5 \begin{align*} \frac{1}{2} \, a^{2} c d x^{2} + \frac{1}{2} \,{\left (2 \, x^{2} \operatorname{artanh}\left (c x\right ) + c{\left (\frac{2 \, x}{c^{2}} - \frac{\log \left (c x + 1\right )}{c^{3}} + \frac{\log \left (c x - 1\right )}{c^{3}}\right )}\right )} a b c d + a^{2} d x + \frac{{\left (2 \, c x \operatorname{artanh}\left (c x\right ) + \log \left (-c^{2} x^{2} + 1\right )\right )} a b d}{c} + \frac{{\left (\log \left (c x + 1\right ) \log \left (-\frac{1}{2} \, c x + \frac{1}{2}\right ) +{\rm Li}_2\left (\frac{1}{2} \, c x + \frac{1}{2}\right )\right )} b^{2} d}{c} + \frac{b^{2} d \log \left (c x + 1\right )}{2 \, c} + \frac{b^{2} d \log \left (c x - 1\right )}{2 \, c} + \frac{4 \, b^{2} c d x \log \left (c x + 1\right ) +{\left (b^{2} c^{2} d x^{2} + 2 \, b^{2} c d x + b^{2} d\right )} \log \left (c x + 1\right )^{2} +{\left (b^{2} c^{2} d x^{2} + 2 \, b^{2} c d x - 3 \, b^{2} d\right )} \log \left (-c x + 1\right )^{2} - 2 \,{\left (2 \, b^{2} c d x +{\left (b^{2} c^{2} d x^{2} + 2 \, b^{2} c d x + b^{2} d\right )} \log \left (c x + 1\right )\right )} \log \left (-c x + 1\right )}{8 \, c} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (a^{2} c d x + a^{2} d +{\left (b^{2} c d x + b^{2} d\right )} \operatorname{artanh}\left (c x\right )^{2} + 2 \,{\left (a b c d x + a b d\right )} \operatorname{artanh}\left (c x\right ), x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} d \left (\int a^{2}\, dx + \int b^{2} \operatorname{atanh}^{2}{\left (c x \right )}\, dx + \int 2 a b \operatorname{atanh}{\left (c x \right )}\, dx + \int a^{2} c x\, dx + \int b^{2} c x \operatorname{atanh}^{2}{\left (c x \right )}\, dx + \int 2 a b c x \operatorname{atanh}{\left (c x \right )}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (c d x + d\right )}{\left (b \operatorname{artanh}\left (c x\right ) + a\right )}^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]